Page({
  data: {
    detailData: {},
    pingLundata:[{
      id:0,
      pingLunid:0,
      isHuifu:false,
      huiFuid:0,
      userName:"李东恒学者1",
      userImg:"../../images/lidongheng.png",
      neiRong:"评论1",
      time:"1分钟前",
      weiZhi:"河南"
    },{
      id:1,
      pingLunid:0,
      isHuifu:true,
      huiFuid:0,
      userName:"李东恒学者2",
      userImg:"../../images/lidongheng.png",
      neiRong:"我要回复1",
      time:"1分钟前",
      weiZhi:"河南"
    },{
      id:2,
      pingLunid:1,
      isHuifu:false,
      huiFuid:0,
      userName:"李东恒学者2",
      userImg:"../../images/lidongheng.png",
      neiRong:"评论2",
      time:"1分钟前",
      weiZhi:"河南"
    }],
    foot:[{
      footImg:"../../images/index.png",
      footDaohang:"首页"
    },{
      footImg:"../../images/xing.png",
      footDaohang:"收藏"
    },{
      footImg:"../../images/tongZhi.png",
      footDaohang:"消息"
    },{
      footImg:"../../images/adminUser.png",
      footDaohang:"我的"
    }],
    footIndex:0
  },
  onLoad: function(options) {
    // 接收并解析传递的数据
    if (options.data) {
      try {
        this.setData({
          detailData: JSON.parse(options.data)
        });
      } catch (e) {
        console.error('数据解析错误:', e);
        // 可以设置默认数据，避免页面空白
        this.setData({
          detailData: {
            title: '数据加载失败',
            neiRong: '请稍后重试'
          }
        });
      }
    }
  },
  footClick:function(e){
    const index = e.currentTarget.dataset.index;
    this.setData({
      footIndex: index
    });
  }
})